package com.itheima.date.jdk8date;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.Period;

//键盘录入一个年份,使用程序输出该年的二月一共多少天
public class Demo2 {
    public static void main(String[] args) {
        LocalDateTime date = LocalDateTime.of(2020, 3, 1, 10, 10, 10);
        LocalDateTime newDate = date.plusDays(-1);
        int dayOfMonth = newDate.getDayOfMonth();
        System.out.println(dayOfMonth);


    }
}
